package edu.pku.sei.transformation.structure;

import edu.pku.sei.transformation.modelType.ModelType;
import edu.pku.sei.transformation.pattern.IPattern;
import edu.pku.sei.transformation.pattern.TPatternGraph;

public class PatternDomain extends Domain {
	private TPatternGraph pattern;
	
	public TPatternGraph getPattern() {
		return pattern;
	}

	public void setPattern(TPatternGraph pattern) {
		this.pattern = pattern;
		if (formalParameter != null)
		{
			this.pattern.setDomainName(formalParameter.getName());
		}
	}
	
	private TypedModel formalParameter;


	public TypedModel getFormalParameter() {
		return formalParameter;
	}

	public void setFormalParameter(TypedModel formalParameter) {
		this.formalParameter = formalParameter;
		if (pattern != null)
		{
			this.pattern.setDomainName(formalParameter.getName());
		}
	}
}
